﻿
using System.IO.IsolatedStorage;
using System.Collections.Generic;
using System;
using System.Windows;
using eLearning.Util;
namespace eLearning
{
    public class Config
    {
        private static readonly Config savedConfig = new Config();

        public static Config Instance
        {
            get
            {
                return savedConfig;
            }
        }

        //CONFIG KEY
        public const string ROOT_URL_KEY = "ROOT_URL";
        public const string UPLOAD_KEY = "UPLOAD_URL";

        //MENU KEY
        public const string MENU1_MHS = "MENU1_MHS";
        public const string MENU2_MHS = "MENU2_MHS";
        public const string MENU3_MHS = "MENU3_MHS";
        public const string MENU4_MHS = "MENU4_MHS";
        public const string MENU5_MHS = "MENU5_MHS";

        public const string MENU1_DOSEN = "MENU1_DOSEN";
        public const string MENU2_DOSEN = "MENU2_DOSEN";
        public const string MENU3_DOSEN = "MENU3_DOSEN";
        public const string MENU4_DOSEN = "MENU4_DOSEN";
        public const string MENU5_DOSEN = "MENU5_DOSEN";

        public const string MENU1_ADMIN = "MENU1_ADMIN";
        public const string MENU2_ADMIN = "MENU2_ADMIN";
        public const string MENU3_ADMIN = "MENU3_ADMIN";
        public const string MENU4_ADMIN = "MENU4_ADMIN";
        public const string MENU5_ADMIN = "MENU5_ADMIN";

        //data share
        public const string MHS = "Mahasiswa";
        public const string DETMATKUL = "DetailMatkul";
        public const string KULIAH = "Perkuliahan";
        public const string RESOURCES = "Resources";
        public const string TUGAS = "Tugas";
        public const string THREAD = "Thread";
        public const string QUIZ = "Quiz";
        public const string QUESTION = "Question";

        //url specific
        public const string ROOT_URL = "http://localhost/wslearning/";
        public string UPLOAD_URL = Setting.Instance.LoadSetting(ROOT_URL_KEY) + "upload/";


        public string COMMON_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/common_services.php"; }
        public string UPLOAD_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/upload_services.php"; }
        public string MHS_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/mahasiswa_services.php"; }
        public string DOSEN_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/dosen_services.php"; }
        public string PERKULIAHAN_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/perkuliahan_services.php"; }
        public string RESOURCES_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/resources_services.php"; }
        public string ANNOUNCE_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/announcement_services.php"; }
        public string ANNOUNCE_M_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/announcement_m_services.php"; }
        public string CATEGORY_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/category_services.php"; }
        public string WIKI_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/wiki_services.php"; }
        public string WIKI_LOG_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/wiki_log_services.php"; }
        public string TUGAS_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/tugas_services.php"; }
        public string THREAD_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/thread_services.php"; }
        public string POST_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/post_services.php"; }
        public string QUIZ_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/quiz_services.php"; }
        public string QUESTION_SERVICE_URL() { return Setting.Instance.LoadSetting(ROOT_URL_KEY) + "ws/quiz_soal_services.php"; }

        //action general
        public const string VIEW_ACTION_KEY = "?action=view";
        public const string VIEW_DETAIL_KEY = "?action=viewDetail";
        public const string VIEW_BY_FILTER_KEY = "?action=viewByFilter";
        public const string FIND_ACTION_KEY = "?action=find";
        public const string ADD_ACTION_KEY = "?action=add";
        public const string SAVE_ACTION_KEY = "?action=save";
        public const string UPDATE_ACTION_KEY = "?action=update";
        public const string DELETE_ACTION_KEY = "?action=delete";
        public const string REMOVE_ACTION_KEY = "?action=remove";
        public const string UPLOAD_ACTION_KEY = "?action=upload";
        public const string UPLOAD_TASK_KEY = "?action=task_upload";
        public const string UPLOAD_ANNOUNCE_KEY = "?action=announce_upload";
        public const string LEAVE_ACTION_KEY = "?action=leave";

        //action specific
        public const string ANGKATAN_ACTION_KEY = "?action=listAngkatan";
        public const string ACCOUNT_ACTION_KEY = "?action=account";
        public const string UPDATE_ACCOUNT_KEY = "?action=updateAccount";
        public const string LOGIN_ACTION_KEY = "?action=login";

        //dosen
        public const string DOSEN_VIEW_ALL_KEY = "?action=listDosen";

        //registrasi mhs
        public const string REG_ACTION_KEY = "?action=register";
        public const string REG_VIEW_APPROVED_KEY = "?action=listMahasiswa";
        public const string REG_VIEW_NOT_APPROVED_KEY = "?action=viewNotApproved";
        public const string REG_APPROVE_ALL_KEY = "?action=approveAll";
        public const string REG_APPROVE_BYNIM_KEY = "?action=approveByNim";
        public const string REG_REJECT_BYNIM_KEY = "?action=rejectByNim";

        //perkuliahan
        public const string PERKULIAHAN_DOSEN_VIEW_KEY = "?action=viewPerkuliahanDosen";
        public const string PERKULIAHAN_MHS_VIEW_KEY = "?action=viewPerkuliahanMhs";
        public const string VIEW_JOINED_PERKULIAHAN_KEY = "?action=viewJoinedPerkuliahan";
        public const string VIEW_JOINED_MEMBER_KEY = "?action=listJoined";
        public const string VIEW_PENDING_MEMBER_KEY = "?action=listPending";
        public const string REJECT_MEMBER_BYNIM_KEY = "?action=rejectPendingByNim";
        public const string REJECT_MEMBER_KEY = "?action=rejectPending";
        public const string ACCEPT_MEMBER_BYNIM_KEY = "?action=acceptPendingByNim";
        public const string ACCEPT_MEMBER_KEY = "?action=acceptPending";
        public const string JOIN_PERKULIAHAN_KEY = "?action=joinKuliah";
        public const string VIEW_NILAI_MEMBER_KEY = "?action=viewNilaiMember";
        public const string SAVE_NILAI_MEMBER_KEY = "?action=updateNilaiMember";
        public const string IMPORT_NEW_KULIAH_KEY = "?action=importNewKuliah";
        public const string IMPORT_MEMBER_KULIAH_KEY = "?action=importMemberKuliah";

        //tugas
        public const string TUGAS_ANSWER_KEY = "?action=kerjakanTugas";
        public const string TUGAS_CHANGE_KEY = "?action=gantiTugas";

    }
}
